package com.haiyou.data.game.role;


import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.google.common.collect.Maps;
import com.haiyou.common.entity.PlayerEntity;
import com.haiyou.common.jdbc.DbType;
import com.haiyou.common.util.time.ServerTime;
import com.haiyou.data.common.cache.redis.redisson.annotation.RDatabase;
import com.haiyou.data.common.persister.mysql.annotation.Comment;
import com.haiyou.data.common.persister.mysql.annotation.Database;
import com.haiyou.data.common.persister.mysql.annotation.Id;
import com.haiyou.data.common.persister.mysql.annotation.Table;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * 玩家角色信息表
 *
 * @author xingyuan
 * @Date 2023年6月26日 上午10:10:00
 */
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Getter
@Setter
@Database(alias = DbType.GAME_DB)
@RDatabase(alias = DbType.GAME_DB)
@Table(name = "t_u_player")
public class PlayerTable implements PlayerEntity<String>{

	private static final long serialVersionUID = -6264163268749739369L;
	
	@Id
	@Comment("数据 id")
	private String id;
	
	@Comment("玩家id")
	private long playerId;
	
	@Comment("玩家账号系统uid")
	private String uid;

	@Comment("服务器ID")
	private int serverId;
	
	@Comment("创建时间")
	private long createTime = ServerTime.timeMillis();

	//暂时用来区分渠道
	@Comment("设备Id")
	private String deviceId;
	
	@Comment("登录时间")
	private Date loginTime;

	
	private HashMap<String,String> data = new HashMap<>();
}
